package com.ruoyi.swap.openapi.price.service.impl;

import java.util.List;

import com.ruoyi.spot.openapi.quotesTicker.domain.VO.SpotOpenapiQuotesTickerVO;
import com.ruoyi.swap.openapi.price.domain.VO.SwapOpenapiPriceVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swap.openapi.price.mapper.SwapOpenapiPriceMapper;
import com.ruoyi.swap.openapi.price.domain.SwapOpenapiPrice;
import com.ruoyi.swap.openapi.price.service.ISwapOpenapiPriceService;

/**
 * 指数/标记价格Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-19
 */
@Service
public class SwapOpenapiPriceServiceImpl implements ISwapOpenapiPriceService 
{
    @Autowired
    private SwapOpenapiPriceMapper swapOpenapiPriceMapper;

    /**
     * 查询指数/标记价格
     * 
     * @param id 指数/标记价格主键
     * @return 指数/标记价格
     */
    @Override
    public SwapOpenapiPriceVO selectSwapOpenapiPriceById(Integer id)
    {
        return swapOpenapiPriceMapper.selectSwapOpenapiPriceById(id);
    }

    /**
     * 查询指数/标记价格列表
     * 
     * @param swapOpenapiPrice 指数/标记价格
     * @return 指数/标记价格
     */
    @Override
    public List<SwapOpenapiPriceVO> selectSwapOpenapiPriceList(SwapOpenapiPriceVO swapOpenapiPrice)
    {
        return swapOpenapiPriceMapper.selectSwapOpenapiPriceList(swapOpenapiPrice);
    }

    @Override
    public List<SwapOpenapiPriceVO> selectSwapAllData() {
        return swapOpenapiPriceMapper.selectSwapAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return swapOpenapiPriceMapper.queryCurryNumber(currencyPair);
    }

    /**
     * 新增指数/标记价格
     * 
     * @param swapOpenapiPrice 指数/标记价格
     * @return 结果
     */
    @Override
    public int insertSwapOpenapiPrice(SwapOpenapiPrice swapOpenapiPrice)
    {
        return swapOpenapiPriceMapper.insertSwapOpenapiPrice(swapOpenapiPrice);
    }

    /**
     * 修改指数/标记价格
     * 
     * @param swapOpenapiPrice 指数/标记价格
     * @return 结果
     */
    @Override
    public int updateSwapOpenapiPrice(SwapOpenapiPrice swapOpenapiPrice)
    {
        return swapOpenapiPriceMapper.updateSwapOpenapiPrice(swapOpenapiPrice);
    }

    /**
     * 批量删除指数/标记价格
     * 
     * @param ids 需要删除的指数/标记价格主键
     * @return 结果
     */
    @Override
    public int deleteSwapOpenapiPriceByIds(Integer[] ids)
    {
        return swapOpenapiPriceMapper.deleteSwapOpenapiPriceByIds(ids);
    }

    /**
     * 删除指数/标记价格信息
     * 
     * @param id 指数/标记价格主键
     * @return 结果
     */
    @Override
    public int deleteSwapOpenapiPriceById(Integer id)
    {
        return swapOpenapiPriceMapper.deleteSwapOpenapiPriceById(id);
    }
}
